package com.fx.demo.common.resulUtils;

/**
 * 返回对象AjaxResult
 * @param <T>
 */
public class AjaxResult<T> {
    private boolean isSucc;
    private int code;
    private String message;
    private int start;
    private int pageSize;
    /**排序用的属性*/
    private String orderColumn;
    private int total;
    private T data;

    public int getStart() {
        return start;
    }

    public void setStart(int start) {
        this.start = start;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public boolean isSucc() {
        return isSucc;
    }

    public void setSucc(boolean succ) {
        isSucc = succ;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    private AjaxResult(){

    }

    public String getOrderColumn() {
        return orderColumn;
    }

    public void setOrderColumn(String orderColumn) {
        this.orderColumn = orderColumn;
    }

    AjaxResult(int start, int pageSize, int total, T data, int code, String message, boolean isSucc,String orderColumn) {
        this.start = start;
        this.pageSize = pageSize;
        this.total = total;
        this.data = data;
        this.code = code;
        this.message = message;
        this.isSucc = isSucc;
        this.orderColumn=orderColumn;
    }
}